import React, {JSX} from 'react';
import {Card} from '../../../kit/Card';
import {TouchableOpacity, View, StyleSheet, Image} from 'react-native';
import {BasicText} from '../../../kit/text';
import LinearGradient from 'react-native-linear-gradient';
import { normalize } from '../../../utils/adapter';

type Props = {};

function InviteCard({}: Props): JSX.Element {
  return (
    <Card Y={-68}>
      <View style={styles.invite_container}>
        <View style={styles.invite_image_box}>
          <Image
            style={styles.invite_image}
            source={require('../../../assets/images/Invitation.png')}
          />
          <View style={{justifyContent:'space-evenly'}}>
            <BasicText color="#333">邀请好友</BasicText>
            <BasicText color="#999999" fontSize={normalize(12)} fontWeight={'medium'}>
              邀请好友立享提现
            </BasicText>
          </View>
        </View>
        <TouchableOpacity style={styles.touchable}>
          <LinearGradient colors={['#FF7A41', '#FF6261']} style={styles.btn}>
            <BasicText fontSize={normalize(14)}>立即邀请</BasicText>
          </LinearGradient>
        </TouchableOpacity>
      </View>
    </Card>
  );
}

const styles = StyleSheet.create({
  invite_container: {
    flexDirection: 'row',
    paddingHorizontal: normalize(12),
    paddingVertical: normalize(8),
    alignItems: 'center',
  },
  invite_image_box: {
    flex: 1,
    flexDirection: 'row',
  },
  touchable: {},
  btn: {
    width: normalize(80),
    height: normalize(30),
    borderRadius: normalize(26),
    justifyContent: 'center',
    alignItems: 'center',
  },
  invite_image: {
    width: normalize(54),
    height: normalize(54),
    marginRight: normalize(8),
  },
});

export default InviteCard;
